<template>
	<view>
		<view class="body" :style="{backgroundImage: 'url('+bgImgUrl+')'}">
			<myHead :title="title" />
			<view class="content">
				<uni-list :border="false">
					<uni-list-chat title="发布任务" :avatarCircle="true" :clickable="true"  to="../createTasks/createTasks"
						avatar="../../static/party_building/assets/icon/one.png">
						<template slot="default">
							<view>
								<image style="width:50upx; height:50upx;"
									src="../../static/party_building/assets/icon/back.png" mode=""></image>
							</view>
						</template>
					</uni-list-chat>
					<uni-list-chat title="知识竞赛" :avatarCircle="true" to="./../knowledge/index"
						avatar="../../static/party_building/assets/icon/two.png">
						<template slot="default">
							<view>
								<image style="width:50upx; height:50upx;"
									src="../../static/party_building/assets/icon/back.png" mode=""></image>
							</view>
						</template>

					</uni-list-chat>
					<uni-list-chat title="资料集中营" :avatarCircle="true" to="../camp/camp"
						avatar="../../static/party_building/assets/icon/three.png">
						<template slot="default">
							<view>
								<image style="width:50upx; height:50upx;"
									src="../../static/party_building/assets/icon/back.png" mode=""></image>
							</view>
						</template>
					</uni-list-chat>

					<uni-list-chat title="悬赏任务" :avatarCircle="true" to="/pages/reward/index"
						avatar="../../static/party_building/assets/icon/four.png">
						<template slot="default">
							<view>
								<image style="width:50upx; height:50upx;"
									src="../../static/party_building/assets/icon/back.png" mode=""></image>
							</view>
						</template>
					</uni-list-chat>
				</uni-list>



			</view>
		</view>

		<view>
			<myFooter :isSelected.sync="selected" />
		</view>
	</view>
</template>

<script>
	import myHeader from '../components/index_header.vue'
	import myFooter from '../components/index_footer.vue'
	import {
		getMenu
	} from '../../api/api_index'
	import NetWorkTool from '@/api/netWorkTool'
	export default {
		data() {
			return {
				title: "服务大厅",
				value: "",
				selected: 'hall',
				bgImgUrl: "../../static/party_building/assets/download_bg.jpg",
				screenHeight: ''
			}
		},
		async created() {
			// this.getBgImg();
		},
		onReady() {
			this.getClientHight();
		},
		components: {
			myHead: myHeader,
			myFooter: myFooter
		},
		methods: {
			getClientHight() {
				this.screenHeight = uni.getSystemInfo().windowHeight
			},
			// 获取背景图
			getBgImg() {
				// NetWorkTool.GET('/api/downloadBgBase64').then(res=>{
				// 	this.bgImgUrl =res
				// });
				this.bgImgUrl = uni.getStorageSync("hall")
			},
		},
	}
</script>
<style lang="scss" scoped>
	.body {
		// background-image: url('../../static/party_building/assets/download_bg.jpg');
		background: no-repeat fixed ceter;
		background-size: 150%;
		height: 100vh;
		/* 0％~100％之间的任何值，将背景图片宽高按百分比显示，当设置一个值的时候同也将其作为图片宽度来等比缩放 */
		background-size: cover;
		/* 将背景图片等比缩放填满整个容器 */
	}

	.content {
		width: 90%;
		margin: 0 auto;
		margin-top: 50upx;

		/deep/ .uni-list {
			background-color: transparent !important;

			.uni-list-chat {
				margin: 30upx 0 !important;
				border-radius: 10upx;

				.uni-list-chat__content {
					position: relative;
					top: 20upx;
				}
			}
		}
	}
</style>
